Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add After Last function with Tests #1494

Merged

Conversation

f-lapinski
Copy link
Contributor

@f-lapinski f-lapinski commented Feb 22, 2025

Change Log

Added

  • afterLast function with test coverage

Fixed

  • Add missing PHPDocs in Chain

Changed

Removed

Deprecated

Security


Description

// returns the contents found after the last occurrence of the given string

Copy link
Contributor

github-actions bot commented Feb 22, 2025

Flow PHP - Benchmarks

Results of the benchmarks from this PR are compared with the results from 1.x branch.

Extractors
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| benchmark             | subject           | revs | its | mem_peak        | mode             | rstdev          |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
| CSVExtractorBench     | bench_extract_10k | 1    | 3   | 4.849mb +0.02%  | 557.899ms +1.48% | ±2.89% +107.05% |
| JsonExtractorBench    | bench_extract_10k | 1    | 3   | 4.922mb +0.01%  | 1.057s -0.70%    | ±0.67% -16.14%  |
| ParquetExtractorBench | bench_extract_10k | 1    | 3   | 86.373mb +0.00% | 909.247ms +0.69% | ±0.87% +19.67%  |
| TextExtractorBench    | bench_extract_10k | 1    | 3   | 4.579mb +0.02%  | 35.392ms -1.27%  | ±0.45% +74.43%  |
| XmlExtractorBench     | bench_extract_10k | 1    | 3   | 4.553mb +0.02%  | 604.746ms -0.25% | ±0.36% -85.33%  |
+-----------------------+-------------------+------+-----+-----------------+------------------+-----------------+
Transformers
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| benchmark                   | subject                  | revs | its | mem_peak         | mode            | rstdev         |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
| RenameEntryTransformerBench | bench_transform_10k_rows | 1    | 3   | 127.375mb +0.00% | 72.211ms +3.21% | ±0.82% -16.69% |
+-----------------------------+--------------------------+------+-----+------------------+-----------------+----------------+
Loaders
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| benchmark          | subject        | revs | its | mem_peak         | mode             | rstdev          |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
| CSVLoaderBench     | bench_load_10k | 1    | 3   | 64.048mb +0.00%  | 104.063ms -0.77% | ±0.84% +131.45% |
| JsonLoaderBench    | bench_load_10k | 1    | 3   | 84.395mb +0.00%  | 98.081ms -0.52%  | ±0.33% -23.29%  |
| ParquetLoaderBench | bench_load_10k | 1    | 3   | 161.243mb +0.00% | 20.628s +0.10%   | ±0.16% -64.98%  |
| TextLoaderBench    | bench_load_10k | 1    | 3   | 18.111mb +0.00%  | 31.575ms -1.39%  | ±0.75% +183.66% |
+--------------------+----------------+------+-----+------------------+------------------+-----------------+
Building Blocks
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| benchmark         | subject                    | revs | its | mem_peak         | mode             | rstdev          |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 43.895mb +0.00%  | 365.370ms +0.79% | ±1.39% +72.12%  |
| TypeDetectorBench | bench_type_detector        | 1    | 3   | 11.705mb +0.01%  | 72.512ms -0.51%  | ±1.90% +272.13% |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 105.994mb +0.00% | 462.007ms +0.89% | ±1.06% -22.00%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 55.185mb +0.00%  | 228.444ms -0.78% | ±0.31% -84.31%  |
| EntryFactoryBench | bench_entry_factory        | 1    | 3   | 14.707mb +0.01%  | 50.847ms +0.84%  | ±2.43% +970.87% |
| RowsBench         | bench_chunk_10_on_10k      | 2    | 3   | 97.038mb +0.00%  | 3.225ms -4.73%   | ±0.09% -97.26%  |
| RowsBench         | bench_diff_left_1k_on_10k  | 2    | 3   | 114.325mb +0.00% | 182.030ms -1.08% | ±0.78% -12.20%  |
| RowsBench         | bench_diff_right_1k_on_10k | 2    | 3   | 97.045mb +0.00%  | 18.285ms -1.51%  | ±0.04% -86.98%  |
| RowsBench         | bench_drop_1k_on_10k       | 2    | 3   | 97.913mb +0.00%  | 1.576ms -16.46%  | ±1.06% -58.60%  |
| RowsBench         | bench_drop_right_1k_on_10k | 2    | 3   | 97.913mb +0.00%  | 1.544ms -22.33%  | ±3.27% +14.84%  |
| RowsBench         | bench_entries_on_10k       | 2    | 3   | 96.073mb +0.00%  | 4.359ms -17.74%  | ±1.32% -33.39%  |
| RowsBench         | bench_filter_on_10k        | 2    | 3   | 96.602mb +0.00%  | 16.542ms -2.70%  | ±1.02% +13.88%  |
| RowsBench         | bench_find_on_10k          | 2    | 3   | 96.602mb +0.00%  | 16.747ms -2.32%  | ±0.60% -56.21%  |
| RowsBench         | bench_find_one_on_10k      | 10   | 3   | 95.294mb +0.00%  | 1.794μs -5.88%   | ±2.67% +9.43%   |
| RowsBench         | bench_first_on_10k         | 10   | 3   | 95.294mb +0.00%  | 0.400μs +33.33%  | ±0.00% +0.00%   |
| RowsBench         | bench_flat_map_on_1k       | 2    | 3   | 104.512mb +0.00% | 14.379ms -0.33%  | ±0.21% -91.71%  |
| RowsBench         | bench_map_on_10k           | 2    | 3   | 134.579mb +0.00% | 71.544ms -1.04%  | ±0.25% -80.25%  |
| RowsBench         | bench_merge_1k_on_10k      | 2    | 3   | 97.122mb +0.00%  | 1.420ms -27.54%  | ±2.36% +81.75%  |
| RowsBench         | bench_partition_by_on_10k  | 2    | 3   | 100.424mb +0.00% | 63.625ms -3.44%  | ±0.75% -67.66%  |
| RowsBench         | bench_remove_on_10k        | 2    | 3   | 98.175mb +0.00%  | 3.785ms -4.39%   | ±0.39% -87.71%  |
| RowsBench         | bench_sort_asc_on_1k       | 2    | 3   | 95.587mb +0.00%  | 41.883ms -0.33%  | ±1.35% +23.42%  |
| RowsBench         | bench_sort_by_on_1k        | 2    | 3   | 95.587mb +0.00%  | 42.085ms -0.57%  | ±1.63% +105.30% |
| RowsBench         | bench_sort_desc_on_1k      | 2    | 3   | 95.587mb +0.00%  | 41.955ms -1.88%  | ±0.42% -75.40%  |
| RowsBench         | bench_sort_entries_on_1k   | 2    | 3   | 97.734mb +0.00%  | 8.309ms -2.90%   | ±0.39% -66.72%  |
| RowsBench         | bench_sort_on_1k           | 2    | 3   | 95.484mb +0.00%  | 29.254ms +0.57%  | ±0.78% -42.32%  |
| RowsBench         | bench_take_1k_on_10k       | 10   | 3   | 95.294mb +0.00%  | 14.635μs -3.62%  | ±2.82% -15.26%  |
| RowsBench         | bench_take_right_1k_on_10k | 10   | 3   | 95.294mb +0.00%  | 16.894μs +9.11%  | ±0.28% -79.82%  |
| RowsBench         | bench_unique_on_1k         | 2    | 3   | 114.326mb +0.00% | 188.188ms +0.42% | ±0.72% +48.76%  |
+-------------------+----------------------------+------+-----+------------------+------------------+-----------------+

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.04%. Comparing base (50f21d1) to head (fcc5e8f).
Report is 4 commits behind head on 1.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              1.x    #1494   +/-   ##
=======================================
  Coverage   83.03%   83.04%           
=======================================
  Files         683      684    +1     
  Lines       18289    18302   +13     
=======================================
+ Hits        15186    15198   +12     
- Misses       3103     3104    +1     
Components Coverage Δ
etl 86.06% <100.00%> (+0.02%) ⬆️
cli 86.73% <ø> (ø)
lib-array-dot 94.53% <ø> (ø)
lib-azure-sdk 62.56% <ø> (ø)
lib-doctrine-dbal-bulk 90.11% <ø> (ø)
lib-filesystem 78.02% <ø> (ø)
lib-parquet 84.33% <ø> (ø)
lib-parquet-viewer 82.02% <ø> (ø)
lib-rdsl 87.09% <ø> (ø)
lib-snappy 90.69% <ø> (-0.47%) ⬇️
bridge-filesystem-async-aws 90.38% <ø> (ø)
bridge-filesystem-azure 89.92% <ø> (ø)
bridge-monolog-http 96.38% <ø> (ø)
symfony-http-foundation 74.41% <ø> (ø)
adapter-chartjs 86.45% <ø> (ø)
adapter-csv 89.57% <ø> (ø)
adapter-doctrine 88.08% <ø> (ø)
adapter-elasticsearch 97.19% <ø> (ø)
adapter-google-sheet 78.04% <ø> (ø)
adapter-http 59.15% <ø> (ø)
adapter-json 90.62% <ø> (ø)
adapter-logger 53.84% <ø> (ø)
adapter-meilisearch 97.75% <ø> (ø)
adapter-parquet 80.85% <ø> (ø)
adapter-text 84.44% <ø> (ø)
adapter-xml 83.15% <ø> (ø)

@norberttech norberttech merged commit c04fe17 into flow-php:1.x Feb 27, 2025
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants